<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>MecGridFrozen.mxml</title>
<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
</head>

<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
<span class="MXMLComponent_Tag">&lt;mx:Application</span><span class="MXMLDefault_Text"> xmlns:mx=&quot;</span><span class="MXMLString">http://www.adobe.com/2006/mxml</span><span class="MXMLDefault_Text">&quot; layout=&quot;</span><span class="MXMLString">absolute</span><span class="MXMLDefault_Text">&quot; xmlns:MecGrid=&quot;</span><span class="MXMLString">com.mechan.MecGrid.*</span><span class="MXMLDefault_Text">&quot; creationComplete=&quot;</span><span class="ActionScriptDefault_Text">applyDataProvider</span><span class="ActionScriptBracket/Brace">()</span><span class="MXMLDefault_Text">&quot; viewSourceURL=&quot;</span><span class="MXMLString">srcview/index.html</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
<span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
    <span class="ActionScriptOperator">&lt;!</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">CDATA</span><span class="ActionScriptBracket/Brace">[</span>
        <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span>.<span class="ActionScriptDefault_Text">collections</span>.<span class="ActionScriptDefault_Text">ArrayCollection</span>;
        <span class="ActionScriptReserved">import</span> <span class="ActionScriptDefault_Text">mx</span>.<span class="ActionScriptDefault_Text">controls</span>.<span class="ActionScriptDefault_Text">Alert</span>;
        
        <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptMetadata">Bindable</span><span class="ActionScriptBracket/Brace">]</span>
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">mdata</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">ArrayCollection</span>;
        
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Array</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptBracket/Brace">[{</span><span class="ActionScriptDefault_Text">selected</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">false</span>, <span class="ActionScriptDefault_Text">country</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Korea&apos;</span>, <span class="ActionScriptDefault_Text">city</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Ulsan&apos;</span>, <span class="ActionScriptDefault_Text">qt1</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt2</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt3</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt4</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">avg</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;&apos;</span><span class="ActionScriptBracket/Brace">}</span>,
                                <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">selected</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">false</span>, <span class="ActionScriptDefault_Text">country</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Korea&apos;</span>, <span class="ActionScriptDefault_Text">city</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Seoul&apos;</span>, <span class="ActionScriptDefault_Text">qt1</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt2</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt3</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt4</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">avg</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;&apos;</span><span class="ActionScriptBracket/Brace">}</span>,
                                <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">selected</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">false</span>, <span class="ActionScriptDefault_Text">country</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Korea&apos;</span>, <span class="ActionScriptDefault_Text">city</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Pusan&apos;</span>, <span class="ActionScriptDefault_Text">qt1</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt2</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt3</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt4</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">avg</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;&apos;</span><span class="ActionScriptBracket/Brace">}</span>,
                                <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">selected</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">false</span>, <span class="ActionScriptDefault_Text">country</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;England&apos;</span>, <span class="ActionScriptDefault_Text">city</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;London&apos;</span>, <span class="ActionScriptDefault_Text">qt1</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt2</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt3</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt4</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">avg</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;&apos;</span><span class="ActionScriptBracket/Brace">}</span>,
                                <span class="ActionScriptBracket/Brace">{</span><span class="ActionScriptDefault_Text">selected</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">false</span>, <span class="ActionScriptDefault_Text">country</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;France&apos;</span>, <span class="ActionScriptDefault_Text">city</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;Paris&apos;</span>, <span class="ActionScriptDefault_Text">qt1</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt2</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt3</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">qt4</span><span class="ActionScriptOperator">:</span>0, <span class="ActionScriptDefault_Text">avg</span><span class="ActionScriptOperator">:</span><span class="ActionScriptString">&apos;&apos;</span><span class="ActionScriptBracket/Brace">}]</span>
        
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">applyDataProvider</span><span class="ActionScriptBracket/Brace">()</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
        <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">int</span>;
            <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">n</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">int</span> <span class="ActionScriptOperator">=</span> 0;
            
            <span class="ActionScriptComment">// make row data for testing (50 count more)
</span>            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">=</span>0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> 50; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">obj</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">()</span>;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">selected</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">country</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">&quot;country &quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">i</span>;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">city</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">&quot;city &quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">i</span>;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">qt1</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">qt2</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">qt3</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">qt4</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">obj</span>.<span class="ActionScriptDefault_Text">avg</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">&quot;&quot;</span>;
                <span class="ActionScriptDefault_Text">dp</span>.<span class="ActionScriptDefault_Text">push</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">obj</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptReserved">for</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">=</span>0; <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">&lt;</span> <span class="ActionScriptDefault_Text">dp</span>.<span class="ActionScriptDefault_Text">length</span>; <span class="ActionScriptDefault_Text">i</span><span class="ActionScriptOperator">++</span><span class="ActionScriptBracket/Brace">)</span>
            <span class="ActionScriptBracket/Brace">{</span>
                <span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">qt1</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Math</span>.<span class="ActionScriptDefault_Text">random</span><span class="ActionScriptBracket/Brace">()</span> <span class="ActionScriptOperator">*</span> 1000;
                <span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">qt2</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Math</span>.<span class="ActionScriptDefault_Text">random</span><span class="ActionScriptBracket/Brace">()</span> <span class="ActionScriptOperator">*</span> 1000;
                <span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">qt3</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Math</span>.<span class="ActionScriptDefault_Text">random</span><span class="ActionScriptBracket/Brace">()</span> <span class="ActionScriptOperator">*</span> 1000;
                <span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">qt4</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Math</span>.<span class="ActionScriptDefault_Text">random</span><span class="ActionScriptBracket/Brace">()</span> <span class="ActionScriptOperator">*</span> 1000;
                <span class="ActionScriptDefault_Text">n</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">i</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">fixed</span>;
                <span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">i</span><span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">avg</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptString">&quot;=(D&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">n</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot; + E&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">n</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot; + F&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">n</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot; + G&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">n</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot;) / 4&quot;</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptComment">// mgrid.dataProvider = dp;
</span>            <span class="ActionScriptDefault_Text">mdata</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">ArrayCollection</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">dp</span><span class="ActionScriptBracket/Brace">)</span>;
        <span class="ActionScriptBracket/Brace">}</span>
        
        <span class="ActionScriptReserved">private</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">fixCellHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">cmd</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">String</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span>
        <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">redraw</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">false</span>;
            
            <span class="ActionScriptReserved">switch</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">cmd</span><span class="ActionScriptBracket/Brace">)</span>
            <span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptReserved">case</span> <span class="ActionScriptString">&quot;frozen&quot;</span><span class="ActionScriptOperator">:</span>
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">&gt;</span> 0 <span class="ActionScriptOperator">||</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Cols</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">&gt;</span> 0<span class="ActionScriptBracket/Brace">)</span>
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">redraw</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
                    <span class="ActionScriptDefault_Text">Alert</span>.<span class="ActionScriptDefault_Text">show</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&quot;Already frozed at row(&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot;), col(&quot;</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Cols</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">+</span> <span class="ActionScriptString">&quot;).\nUnFroze Cell first then try again.&quot;</span><span class="ActionScriptBracket/Brace">)</span>;
                    <span class="ActionScriptReserved">return</span>;
                <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">r</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">int</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">topRow</span>;
                <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">c</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">int</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">leftColumn</span>;
                <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_start</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">r</span>;
                <span class="ActionScriptReserved">if</span> <span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">SelectedItems</span> <span class="ActionScriptOperator">&amp;&amp;</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">SelectedItems</span>.<span class="ActionScriptDefault_Text">length</span> <span class="ActionScriptOperator">&gt;</span> 0<span class="ActionScriptBracket/Brace">)</span>
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">SelectedItems</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">rowIndex</span>;
                    <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Cols</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">SelectedItems</span><span class="ActionScriptBracket/Brace">[</span>0<span class="ActionScriptBracket/Brace">]</span>.<span class="ActionScriptDefault_Text">colIndex</span>;
                <span class="ActionScriptBracket/Brace">}</span>
                <span class="ActionScriptReserved">else</span>
                <span class="ActionScriptBracket/Brace">{</span>
                    <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">r</span>;
                    <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Cols</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">c</span>;
                <span class="ActionScriptBracket/Brace">}</span>
                
                <span class="ActionScriptReserved">break</span>;
            <span class="ActionScriptReserved">case</span> <span class="ActionScriptString">&quot;unfrozen&quot;</span><span class="ActionScriptOperator">:</span>
                <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_start</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Rows</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Cols</span>.<span class="ActionScriptDefault_Text">frozen_start</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">Cols</span>.<span class="ActionScriptDefault_Text">frozen_end</span> <span class="ActionScriptOperator">=</span> 0;
                <span class="ActionScriptReserved">break</span>;
            <span class="ActionScriptBracket/Brace">}</span>
            
            <span class="ActionScriptComment">// call for horizontal or vertical scroll size is changed
</span>            <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">initSizeVariables</span><span class="ActionScriptBracket/Brace">(</span>2<span class="ActionScriptBracket/Brace">)</span>;
            
            <span class="ActionScriptDefault_Text">mgrid</span>.<span class="ActionScriptDefault_Text">redraw</span> <span class="ActionScriptOperator">=</span> <span class="ActionScriptReserved">true</span>;
        <span class="ActionScriptBracket/Brace">}</span>
    <span class="ActionScriptBracket/Brace">]]</span><span class="ActionScriptOperator">&gt;</span>
<span class="MXMLSpecial_Tag">&lt;/mx:Script&gt;</span>
<span class="MXMLComponent_Tag">&lt;MecGrid:MecGrid</span><span class="MXMLDefault_Text"> id=&quot;</span><span class="MXMLString">mgrid</span><span class="MXMLDefault_Text">&quot; bottom=&quot;</span><span class="MXMLString">40</span><span class="MXMLDefault_Text">&quot; right=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; top=&quot;</span><span class="MXMLString">80</span><span class="MXMLDefault_Text">&quot; left=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; dataProvider=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">mdata</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
    <span class="MXMLComponent_Tag">&lt;MecGrid:ResourceString&gt;</span>
eNrF1clu2zAQBuBjgT4FQV0auKhNLY4DWQUSBz31UjTI1WCtsURAIl1yvOR9+qClRC+QExrqwc3F
0lCj4f8JMPjhz/S7MPj1IyFTtUKhJFmoymR0QslS7CDXamurcF+5ZyNKatAFzN0bGY27C/ND77qW
r7rnh7HtVFPa+SsNPDclAGb0ya5BBYumtVY5ZJQ1bUrjYTNGCWqAjYBt294Us9NeCDvklShkDdLO
G5+tuO0zmtBhi3YpTXN/rIjktd3YFnM7MOfIlwIq+5JLBjklG2HErwraAJAL5G3xjTZfT8gcdm0W
vka1FTmWbd/+LmZuJr6soJu4SXWqDkmZbVkqXXM0qIUsMkpJaT8Y6Iz+bAOl7uJEbylYR7FQa4n6
pReCeRDjDiLpIOJ/RMxcnnR/9TPCLkNgP0P4Pww2TNr8+NNHnfS/kfUKH3nCTyb+8GzUK33wOQiC
L0FwUjzbPKi0SZlB8mPNETT5dH/jN8VnprCXKfaY7sJrmkKZH00PF0zJmSnqZUp8ptE1TZE+mWYX
TOMzU9zLNH4XU4zl0fR4wXTbMfFN0ct06zGxJLoC6n4DmhdAMvs3GjwMZoPHGzIkcepZ359Jw+Oh
NB22p/NfW+95aQ==
    <span class="MXMLComponent_Tag">&lt;/MecGrid:ResourceString&gt;</span>
<span class="MXMLComponent_Tag">&lt;/MecGrid:MecGrid&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; text=&quot;</span><span class="MXMLString">MecGrid Application Demo with Froze Cell</span><span class="MXMLDefault_Text">&quot; fontWeight=&quot;</span><span class="MXMLString">bold</span><span class="MXMLDefault_Text">&quot; fontSize=&quot;</span><span class="MXMLString">20</span><span class="MXMLDefault_Text">&quot; color=&quot;</span><span class="MXMLString">#FDFE88</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
<span class="MXMLComponent_Tag">&lt;mx:HBox</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">26</span><span class="MXMLDefault_Text">&quot; bottom=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:LinkButton</span><span class="MXMLDefault_Text"> label=&quot;</span><span class="MXMLString">Copyright (c) 2008 MECHAN. All Rights Reserved</span><span class="MXMLDefault_Text">&quot; 
        click=&quot;</span><span class="ActionScriptDefault_Text">navigateToURL</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">URLRequest</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&apos;http://code.google.com/p/flexspreadsheet/&apos;</span><span class="ActionScriptBracket/Brace">))</span>;<span class="MXMLDefault_Text">&quot;
        styleName=&quot;</span><span class="MXMLString">footerLink</span><span class="MXMLDefault_Text">&quot; alpha=&quot;</span><span class="MXMLString">0.2</span><span class="MXMLDefault_Text">&quot;
         color=&quot;</span><span class="MXMLString">#DB93F9</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:Spacer</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; </span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:LinkButton</span><span class="MXMLDefault_Text"> label=&quot;</span><span class="MXMLString">Created by MECHAN</span><span class="MXMLDefault_Text">&quot; 
        click=&quot;</span><span class="ActionScriptDefault_Text">navigateToURL</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptReserved">new</span> <span class="ActionScriptDefault_Text">URLRequest</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&apos;mailto:mechan93@gmail.com&apos;</span><span class="ActionScriptBracket/Brace">))</span>;<span class="MXMLDefault_Text">&quot;
        styleName=&quot;</span><span class="MXMLString">footerLink</span><span class="MXMLDefault_Text">&quot;
        textDecoration=&quot;</span><span class="MXMLString">underline</span><span class="MXMLDefault_Text">&quot; alpha=&quot;</span><span class="MXMLString">0.2</span><span class="MXMLDefault_Text">&quot;
         color=&quot;</span><span class="MXMLString">#04FCFF</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
<span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">49</span><span class="MXMLDefault_Text">&quot; label=&quot;</span><span class="MXMLString">Froze Current Cell</span><span class="MXMLDefault_Text">&quot; click=&quot;</span><span class="ActionScriptDefault_Text">fixCellHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&apos;frozen&apos;</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">150</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">49</span><span class="MXMLDefault_Text">&quot; label=&quot;</span><span class="MXMLString">Un Froze</span><span class="MXMLDefault_Text">&quot; click=&quot;</span><span class="ActionScriptDefault_Text">fixCellHandler</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptString">&apos;unfrozen&apos;</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
<span class="MXMLComponent_Tag">&lt;/mx:Application&gt;</span></pre></body>
</html>
